<%--suppress XmlPathReference --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>login jsp</title>
</head>
<body>
<c:url value="/validateLogin" var="loginUrl"></c:url>
<div><c:if test="${error == 'login'}">登录失败</c:if></div>
<div><c:if test="${error == 'session'}">已经有人登陆过了！</c:if></div>
<form method="POST" action="${loginUrl}">
    <input name="username" type="text">
    <input name="password" type="password">
    <input name="${_csrf.parameterName}" value="${_csrf.token}" type="hidden">
    <input type="checkbox" name="_spring_security_remember_me">
    <input type="submit" value="submit">
</form>
</body>
</html>
